package br.com.controlador;

import br.com.modelo.Cfop;
import java.io.Serializable;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import util.JPAUtil;

/**
 *
 * @author gilberto.costa
 */
@ManagedBean
@ViewScoped
public class CfopControler implements Serializable {

    private Cfop cfop;
    private List<Cfop> listCfop;

    @PostConstruct
    public void init() {
        setCfop(new Cfop());
        setListCfop((List<Cfop>) JPAUtil.buscarTodos(Cfop.class));
    }

    public Cfop getCfop() {
        return cfop;
    }

    public void setCfop(Cfop cfop) {
        this.cfop = cfop;
    }

    public List<Cfop> getListCfop() {
        return listCfop;
    }

    public void setListCfop(List<Cfop> listCfop) {
        this.listCfop = listCfop;
    }
}
